import request from '@/utils/request'

// 查询教练员库列表
export function listCoach(query) {
  return request({
    url: '/work/librarycoach/list',
    method: 'get',
    params: query
  })
}

// 查询教练员库详细
export function getCoach(id) {
  return request({
    url: '/work/librarycoach/' + id,
    method: 'get'
  })
}

// 新增教练员库
export function addCoach(data) {
  return request({
    url: '/work/librarycoach/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改教练员库
export function updateCoach(data) {
  return request({
    url: '/work/librarycoach/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除教练员库
export function delCoach(id) {
  return request({
    url: '/work/librarycoach/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}

export function delCoachs(ids) {
  return request({
    url: '/work/librarycoach/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}
